#ifndef JPROJECTVIEW_H
#define JPROJECTVIEW_H

#include <QTreeView>
#include <QAction>

class JProjectModel;

class JProjectView : public QTreeView
{
	Q_OBJECT

public:
	JProjectView(QWidget *parent, QAction *addSTL, QAction *addJTS, QAction *removeSTL);
	~JProjectView();

	void insertChild(const QString& name);

public slots:
	void setCurrentProject(const QString& name);
	void updateActions();

private slots:

	void insertRow();
	void removeRow();

	bool insertColumn(const QModelIndex &parent = QModelIndex());
	bool removeColumn(const QModelIndex &parent = QModelIndex());

	void contextMenu(const QPoint &pt);

private:
	JProjectModel* m_projectModel;
	QAction *m_addSTL;
	QAction *m_addJTS;
	QAction *m_removeSTL;
};

#endif // JPROJECTVIEW_H
